package models

import com.mongodb.casbah.Imports._
import com.mongodb.casbah.commons.conversions.scala._

case class ProjectInfo(lastSaved: String) 

object ProjectInfo{
  val fileInfoCollection = MongoClient()("prjplan")("file")
  val mobject = MongoDBObject("lastSaved" -> 1)
  def lastSaved= for (fileInfo <- fileInfoCollection.findOne) yield fileInfo.as[String]("lastSaved")
    
  }